package com.redmoon.dingding.service.message;

import com.cloudweb.oa.api.IDdService;
import com.cloudweb.oa.utils.SpringUtil;
import com.redmoon.dingding.service.BaseService;

public class MsgService extends BaseService {
    public static enum MESSAGE_TYPE_ENMU {
        NOTICE, SYSMSG, MSG, FLOW, MODULE
    }

    public MsgService() {

    }

    /**
     * 发送消息
     *
     * @param receiver
     * @param content
     * @param action
     * @param type
     * @return
     */
    public String sendMsg(String receiver, String content, String action, MESSAGE_TYPE_ENMU type) {
        IDdService ddService = SpringUtil.getBean(IDdService.class);
        return ddService.sendMsg(receiver, content, action, type);
    }
}
